<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<link rel="stylesheet" type="text/css" media="screen" href="css/core/spc.css">


<section id="widget-grid" class="">
    <jsp:include page="../searchbar.jsp"/>
    <!-- row -->
    <div class="row">
        <article class="col-sm-9 sortable-grid ui-sortable">
            <div class="jarviswidget jarviswidget-sortable" id="wgt_chart"
                 data-widget-togglebutton="false" data-widget-editbutton="false"
                 data-widget-fullscreenbutton="false" data-widget-colorbutton="false"
                 data-widget-deletebutton="false" role="widget" style="">
                <header role="heading">
                    <ul class="nav nav-tabs  in" id="tab_chartTab">
                        <li class="active">
                            <a id="NDChart" data-toggle="tab" href="#s1" id="NDChart"><span class="hidden-mobile hidden-tablet">ND Chart</span></a>
                        </li>
                        <li>
                            <a id="RunChart" data-toggle="tab" href="#s2" id="RunChart"><span class="hidden-mobile hidden-tablet">Run Chart</span></a>
                        </li>
                        <li>
                            <a id="XBarChart" data-toggle="tab" href="#s3" id="XBarChart"><span class="hidden-mobile hidden-tablet">X-Bar Chart</span></a>
                        </li>
                        <li>
                            <a id="SDChart" data-toggle="tab" href="#s4" id="SDChart"><span class="hidden-mobile hidden-tablet">SD Chart</span></a>
                        </li>
                        <li>
                            <a id="RChart" data-toggle="tab" href="#s5" id="RChart"><span class="hidden-mobile hidden-tablet">R Chart</span></a>
                        </li>
                        <li>
                            <a id="MRChart" data-toggle="tab" href="#s6" id="MRChart"><span class="hidden-mobile hidden-tablet">MR Chart</span></a>
                        </li>
                    </ul>
                    <div class="widget-toolbar" role="menu">
                        <button class="btn btn-primary" data-toggle="modal" data-target="#dlg_spc_import" rel="tooltip" title="" data-placement="bottom" data-original-title="Import data.">
                            Import
                        </button>
                        <shiro:hasAnyPermission name="analysis:spc:export">
                            <div class="btn-group">
                                <button id="drp_export" class="btn dropdown-toggle btn-xs btn-warning" data-toggle="dropdown">
                                    Export</i> <i class="fa fa-caret-down"></i>
                                </button>
                                <ul class="dropdown-menu pull-right">
                                    <li class="disabled">
                                        <a id="a_export_current" data-toggle="modal" data-target="#dlg_all_selectCharts" style="cursor:pointer;" disabled=true>
                                            <i class="fa fa-file-excel-o fa-fw text-success"></i>
                                            Export Charts for current item
                                        </a>
                                    </li>
                                    <li>
                                        <a id="a_export_mulp" data-toggle="modal" data-target="#dlg_ndc_selectItems" style="cursor:pointer;">
                                            <i class="fa fa-file-excel-o fa-fw text-success"></i>
                                            Export ND Charts for multiple items
                                        </a>
                                    </li>

                                    <li>
                                        <a href="#exportfile/all"> <i class="fa fa-file-excel-o fa-fw text-success"></i>
                                            Export History
                                        </a>
                                    </li>

                                </ul>
                            </div>
                        </shiro:hasAnyPermission>

                    </div>

                    <div class="widget-toolbar" role="menu">
                        <span class="jarviswidget-loader"><i class="fa fa-refresh fa-spin"></i></span>
                        <button type="button" id="btn_refreshChart" data-loading-text="<i class='fa fa-refresh fa-spin'></i> Loading..." rel="tooltip" class="btn btn-primary ajax-refresh" title="" data-placement="bottom"
                                data-original-title="Rebuild Chart">
                            Refresh Chart
                        </button>
                    </div>
                </header>
                <!-- widget div-->
                <div role="content">


                    <!-- widget edit box -->
                    <div class="jarviswidget-editbox">
                    </div>
                    <!-- end widget edit box -->

                    <div class="widget-body no-padding">
                        <div id="div_chartAlert" class="alert alert-warning margin-bottom-0" style="display:none;">
                            <strong><i class="fa fa-exclamation-circle"></i> Condition is change, </strong> rebuilding the chart to apply the new setting.
                        </div>
                        <div id="div_chartAlertError" class="alert alert-danger margin-bottom-0" style="display:none;">
                            <strong><i class="fa fa-exclamation-circle"></i></strong> <spring:message code="EXCEPTION_SPC_CHART_BUILD_ERROR"/>
                        </div>
                        <!-- content -->
                        <div id="myTabContent" class="tab-content">
                            <div class="tab-pane fade in active no-padding-bottom" id="s1">

                                <div class="widget-body-toolbar bg-color-white padding-10">
                                    <div class="form-inline" role="form">

                                        <div class="form-group" style="width:160px;">
                                            <input style="width:100%" id="slt_sed_filterType" placeholder="Filters"/>
                                        </div>
                                        <div class="form-group" style="width:160px;">
                                            <input style="width:100%" id="slt_sed_filterValue" placeholder="Value"/>
                                        </div>
                                    </div>
                                </div>

                                <div class="row no-space padding-10">
                                    <div class="col-xs-12 col-sm-12 col-md-2 col-lg-2 ">
                                        <div class="row" id="div_NDChartLabel">
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> <strong>Statistical</strong><span class="pull-right"></span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Samples<span class="pull-right" id="spn_ndc_samples">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> AVG<span class="pull-right" id="spn_ndc_avg">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Max<span class="pull-right" id="spn_ndc_max">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Min<span class="pull-right" id="spn_ndc_min">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Range<span class="pull-right" id="spn_ndc_range">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> StDev<span class="pull-right" id="spn_ndc_stdev">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> LCL<span class="pull-right" id="spn_ndc_lcl">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> UCL<span class="pull-right" id="spn_ndc_ucl">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Kurtosis<span class="pull-right" id="spn_ndc_ku">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Skewness<span class="pull-right" id="spn_ndc_sk">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> <strong>Constant</strong><span class="pull-right"></span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Groups<span class="pull-right" id="spn_ndc_group">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                        <span class="text"> USL<span class="pull-right">
                                                            <a href="form-x-editable.html#" id="spn_ndc_usl" data-pk="1" data-placement="right"
                                                               data-original-title="Start typing USL.."></a></span></span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                        <span class="text"> LSL<span class="pull-right"><a href="form-x-editable.html#" id="spn_ndc_lsl" data-type="text" data-pk="1" data-placement="right"
                                                                                                           data-original-title="Start typing LSL.."></a></span></span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> Center<span class="pull-right" id="spn_ndc_center">-</span> </span>
                                            </div>

                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> <strong>Capability Index</strong><span class="pull-right"></span> </span>

                                            </div>
                                            <hr/>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> CA<span class="pull-right label bg-color-lighten" id="spn_ndc_ca">-%</span></span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> CPK<span class="pull-right label bg-color-lighten" id="spn_ndc_cpk">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> CP<span class="pull-right label bg-color-lighten" id="spn_ndc_cp">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> CPL<span class="pull-right label bg-color-lighten" id="spn_ndc_cpl">-</span> </span>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-12 col-lg-12">
                                                <span class="text"> CPU<span class="pull-right label bg-color-lighten" id="spn_ndc_cpu">-</span> </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-xs-12 col-sm-12 col-md-10 col-lg-10">
                                        <div class="padding-10">
                                            <div id="chart_NDC" class="" style="min-height:403px;"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- end s1 tab pane -->
                            <div class="tab-pane fade in" id="s2">
                                <div class="widget-body-toolbar bg-color-white">
                                    <div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
                                        <span style="line-height:24px;">Judge Rules:</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R1" data-placement="bottom" data-original-title="Some details">R1<span></span></span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R2" data-placement="bottom" data-original-title="Some details">R2</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R3" data-placement="bottom" data-original-title="Some details">R3</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R4" data-placement="bottom" data-original-title="Some details">R4</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R5" data-placement="bottom" data-original-title="Some details">R5</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R6" data-placement="bottom" data-original-title="Some details">R6</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R7" data-placement="bottom" data-original-title="Some details">R7</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R8" data-placement="bottom" data-original-title="Some details">R8</span>
                                    </div>
                                    <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
                                        <form method="post" id="form_ispc_r_line" class="form-inline pull-right">
                                            <div class="form-group">
                                                <span class="sr-only">Custom Line1:</span>
                                            </div>
                                            <div class="form-group">
                                                <%--<label class="sr-only" for="txt_ispc_r_line1_name">Custom Line1:</label>--%>
                                                <input type="text" class="form-control input-xs" style="width:80px;" name="line1Name" id="txt_ispc_r_line1_name" value="" placeholder="Line Name"/> :
                                            </div>
                                            <div class="form-group">
                                                <input type="text" class="form-control  input-xs" style="width:80px;" name="line1Value" id="txt_ispc_r_line1_value" value="" placeholder="Value"/>
                                            </div>
                                            -
                                            <div class="form-group">
                                                <label class="sr-only" for="txt_ispc_r_line2_name">Custom Line1:</label>
                                                <input type="text" class="form-control  input-xs" style="width:80px;" name="line2Name" id="txt_ispc_r_line2_name" value="" placeholder="Line Name"/> :
                                            </div>
                                            <div class="form-group">
                                                <input type="text" class="form-control input-xs" style="width:80px;" name="line2Value" id="txt_ispc_r_line2_value" value="" placeholder="Value"/>
                                            </div>
                                            <button type="button" class="btn btn-success btn-xs margin-top-0" id="btn_ispc_r_line_draw">Draw</button>
                                        </form>
                                        <span class="font-sm pull-right" style="line-height:24px;">Custom Line </span>
                                    </div>
                                </div>
                                <div class="row no-space">
                                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-10">
                                        <div id="chart_RunC" class="" style="min-height:435px;"></div>
                                    </div>
                                </div>
                            </div>
                            <!-- end s2 tab pane -->

                            <div class="tab-pane fade in" id="s3">
                                <div class="widget-body-toolbar bg-color-white">
                                    <span>Judge Rules:</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R1" data-placement="bottom" data-original-title="Some details">R1<span></span></span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R2" data-placement="bottom" data-original-title="Some details">R2</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R3" data-placement="bottom" data-original-title="Some details">R3</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R4" data-placement="bottom" data-original-title="Some details">R4</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R5" data-placement="bottom" data-original-title="Some details">R5</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R6" data-placement="bottom" data-original-title="Some details">R6</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R7" data-placement="bottom" data-original-title="Some details">R7</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R8" data-placement="bottom" data-original-title="Some details">R8</span>
                                </div>
                                <div class="row no-space">
                                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-10">
                                        <div id="chart_XBarC" class="" style="min-height:435px;"></div>
                                    </div>
                                </div>
                            </div>

                            <div class="tab-pane fade in" id="s4">
                                <div class="widget-body-toolbar bg-color-white">
                                    <span>Judge Rules:</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R1" data-placement="bottom" data-original-title="Some details">R1<span></span></span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R2" data-placement="bottom" data-original-title="Some details">R2</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R3" data-placement="bottom" data-original-title="Some details">R3</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R4" data-placement="bottom" data-original-title="Some details">R4</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R5" data-placement="bottom" data-original-title="Some details">R5</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R6" data-placement="bottom" data-original-title="Some details">R6</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R7" data-placement="bottom" data-original-title="Some details">R7</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R8" data-placement="bottom" data-original-title="Some details">R8</span>
                                </div>
                                <div class="row no-space">
                                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-10">
                                        <div id="chart_SDC" class="" style="min-height:435px;"></div>
                                    </div>
                                </div>
                            </div>

                            <div class="tab-pane fade in" id="s5">
                                <div class="widget-body-toolbar bg-color-white">
                                    <span>Judge Rules:</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R1" data-placement="bottom" data-original-title="Some details">R1<span></span></span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R2" data-placement="bottom" data-original-title="Some details">R2</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R3" data-placement="bottom" data-original-title="Some details">R3</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R4" data-placement="bottom" data-original-title="Some details">R4</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R5" data-placement="bottom" data-original-title="Some details">R5</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R6" data-placement="bottom" data-original-title="Some details">R6</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R7" data-placement="bottom" data-original-title="Some details">R7</span>
                                    <span class="label bg-color-green" rel="tooltip" title="" data-code="R8" data-placement="bottom" data-original-title="Some details">R8</span>
                                </div>
                                <div class="row no-space">
                                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-10">
                                        <div id="chart_RC" class="" style="min-height:435px;"></div>
                                    </div>
                                </div>
                            </div>

                            <div class="tab-pane fade in" id="s6">
                                <div class="widget-body-toolbar bg-color-white">
                                    <div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
                                        <span  style="line-height:24px;">Judge Rules:</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R1" data-placement="bottom" data-original-title="Some details">R1<span></span></span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R2" data-placement="bottom" data-original-title="Some details">R2</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R3" data-placement="bottom" data-original-title="Some details">R3</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R4" data-placement="bottom" data-original-title="Some details">R4</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R5" data-placement="bottom" data-original-title="Some details">R5</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R6" data-placement="bottom" data-original-title="Some details">R6</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R7" data-placement="bottom" data-original-title="Some details">R7</span>
                                        <span class="label bg-color-green" rel="tooltip" title="" data-code="R8" data-placement="bottom" data-original-title="Some details">R8</span>
                                    </div>
                                    <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">

                                        <form method="post" id="form_ispc_mr_line" class="form-inline  pull-right">
                                            <div class="form-group">
                                                <span class="sr-only">Custom Line1:</span>
                                            </div>
                                            <div class="form-group">
                                                <input type="text" class="form-control input-xs" style="width:80px;" name="line1Name" id="txt_ispc_mr_line1_name" value="" placeholder="Line Name"/> :
                                            </div>
                                            <div class="form-group">
                                                <input type="text" class="form-control  input-xs" style="width:80px;" name="line1Value" id="txt_ispc_mr_line1_value" value="" placeholder="Value"/>
                                            </div>
                                            -
                                            <div class="form-group">
                                                <label class="sr-only" for="txt_ispc_r_line2_name">Custom Line1:</label>
                                                <input type="text" class="form-control  input-xs" style="width:80px;" name="line2Name" id="txt_ispc_mr_line2_name" value="" placeholder="Line Name"/> :
                                            </div>
                                            <div class="form-group">
                                                <input type="text" class="form-control input-xs" style="width:80px;" name="line2Value" id="txt_ispc_mr_line2_value" value="" placeholder="Value"/>
                                            </div>
                                            <button type="button" class="btn btn-success btn-xs margin-top-0" id="btn_ispc_mr_line_draw">Draw</button>
                                        </form>
                                        <span class="font-sm pull-right" style="line-height:24px;">Custom Line </span>
                                    </div>

                                    <%--<form method="post" id="form_ispc_mr_line">--%>
                                    <%--<span>Custom Line1:</span>--%>
                                    <%--<input type="text" name="line1Name" id="txt_ispc_mr_line1_name" value="" placeholder="line1"/>:--%>
                                    <%--<input type="text" name="line1Value" id="txt_ispc_mr_line1_value" value=""/>--%>
                                    <%--<span>Custom Line2:</span>--%>
                                    <%--<input type="text" name="line2Name" id="txt_ispc_mr_line2_name" value="" placeholder="line2"/>:--%>
                                    <%--<input type="text" name="line2Value" id="txt_ispc_mr_line2_value" value=""/>--%>
                                    <%--<button type="button" class="label bg-color-green" id="btn_ispc_mr_line_draw">Draw</button>--%>
                                    <%--</form>--%>
                                </div>
                                <div class="row no-space">
                                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-10">
                                        <div id="chart_MRC" class="" style="min-height:435px;"></div>
                                    </div>
                                </div>
                            </div>

                        </div>

                        <!-- end content -->
                    </div>

                </div>
                <!-- end widget div -->
            </div>
        </article>
        <article class="col-sm-3 sortable-grid ui-sortable">
            <div class="jarviswidget jarviswidget-sortable" id="wid-id-1" data-widget-togglebutton="false" data-widget-editbutton="false" data-widget-fullscreenbutton="false" data-widget-colorbutton="false"
                 data-widget-deletebutton="false" role="widget" style="">
                <header role="heading">
                    <div class="jarviswidget-ctrls" role="menu">
                        <!--<a href="javascript:void(0);" class="button-icon jarviswidget-toggle-btn" rel="tooltip" title="" data-placement="bottom" data-original-title="Collapse"><i class="fa fa-minus "></i></a>-->
                        <!--<a href="javascript:void(0);" class="button-icon jarviswidget-fullscreen-btn" rel="tooltip" title="" data-placement="bottom" data-original-title="Fullscreen"><i class="fa fa-expand "></i></a>-->
                        <!--<a href="javascript:void(0);" class="button-icon jarviswidget-delete-btn" rel="tooltip" title="" data-placement="bottom" data-original-title="Delete"><i class="fa fa-times"></i></a>-->
                    </div>
                    <h2><strong>Test Items</strong></h2>

                    <span class="jarviswidget-loader"><i class="fa fa-refresh fa-spin"></i></span>
                </header>
                <!-- widget div-->
                <div role="content">

                    <!-- widget edit box -->
                    <div class="jarviswidget-editbox">
                    </div>
                    <!-- end widget edit box -->

                    <!-- widget content -->
                    <div class="widget-body no-padding">
                        <div class="custom-scroll table-responsive no-padding" style="height:453px; overflow-y: scroll;">
                            <table id="tbl_distinctTestItem" class="table table-hover">
                                <thead>
                                <th>Name</th>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>

                        <div class="widget-footer">
                            <input class="form-control" type="text" placeholder="Filter" id="txt_itemsFilter" name="search_LIKE_name"></input>
                        </div>
                    </div>
                    <!-- end widget content -->

                </div>
                <!-- end widget div -->

            </div>

        </article>


        <!-- Modal Import-->
        <div class="modal fade" id="dlg_spc_import" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title">SPC Data Import </h4>
                    </div>
                    <div class="modal-body fuelux">

                        <div id="alt_grr_import_msgbar" class="alert alert-warning margin-bottom-10" style="display:none; "><spring:message code="DATAIMPORT_ERR_MSG"/></div>
                        <div class="row">
                            <div class="col-md-12">
                                <a href="#data/history" class="pull-right"> <spring:message code="DATAIMPORT_HISTORY"/> </a>
                            </div>
                        </div>
                        <%--<hr class="margin-top-0 margin-bottom-10"/>--%>
                        <div id="wzd_spc_import" class="wizard" style="display:none;">
                            <ul class="steps">
                                <li data-target="#step1" class="active">
                                    <span class="badge badge-info">1</span>Step 1<span class="chevron"></span>
                                </li>
                                <li data-target="#step2">
                                    <span class="badge">1</span>Step 2<span class="chevron"></span>
                                </li>
                                <li data-target="#step3">
                                    <span class="badge">2</span>Step 3<span class="chevron"></span>
                                </li>
                            </ul>
                        </div>

                        <div class="step-content">
                            <div class="step-pane active" id="step1">
                                <form id="frm_spc_import" enctype="multipart/form-data" target="uploadf" method="post">
                                    <input type='hidden' id="txt_spc_import_soltkey" name='soltkey'/>
                                    <div class="row">
                                        <div class="col-md-8">
                                            <div class="form-group">
                                                <label>Project</label>
                                                <div>
                                                    <input style="width:100%" id="slt_spc_import_project" name="projectId"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-8">
                                            <div>
                                                <label>Choose file</label>
                                                <input type="file" class="btn btn-default" id="fle_spc_import_file" name="file" style="width:100%;" multiple="multiple">
                                                <div id="div_spc_import_upload_files"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="margin-top-10 margin-bottom-10"/>
                                    <div class="row">
                                        <div class="col-md-8">
                                            <div class="form-group margin-top-0">
                                                <label>For BUT-5</label>
                                                <input type="text" class="form-control" id="fle_spc_import_bu5Name" name="bu5Name" value="AlignmentResult" placeholder="Field Name" style="width:100%;" disabled>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="checkbox padding-top-15" style="min-height:40px;">
                                                <label>
                                                    <input type="checkbox" class="checkbox style-0" id="ckb_spc_import_enableBu5" name="bu5Enabled">
                                                    <span>Enable BUT5</span>
                                                </label>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="step-pane" id="step2">

                            </div>
                            <div class="step-pane" id="step3">
                                <%--<span class="pull-right"><a href="javascript:void(0);" class="btn-prev">--%>
                                <%--<i class="fa fa-reply"> Go Back</i>--%>
                                <%--</a></span>--%>
                                <span id="spn_spc_import_operator">Importing GRR Data...</span>
                                <div class="progress progress-xs">
                                    <div id="spn_spc_import_processbar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;" class="progress-bar"></div>
                                </div>
                                <div>
                                    Status: <span id="spn_spc_import_status"></span>
                                </div>
                                <div>
                                    Time: <span id="spn_spc_import_time"></span>
                                </div>
                                <br>
                                Log:
                                <div class="well well-light well-clean" id="spn_spc_import_logArea" style="min-height:100px;overflow: auto;">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="modal-footer">

                        <button id="btn_spc_import_submit" type="button" class="btn btn-primary" data-loading-text="<i class='fa fa-refresh fa-spin'></i>  Importing...&nbsp;">
                            <%--<spring:message code="SPC_EXPORT_PREVIEW"/>--%>
                            Start Import
                        </button>
                        <button id="btn_spc_import_gobackTo1" type="button" class="btn btn-primary" style="display: none;">
                            <%--<spring:message code="SPC_EXPORT_PREVIEW"/>--%>
                            <i class="fa fa-reply"> Go Back</i>
                        </button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">
                            <spring:message code="GLOBAL_BUTTON_CANCEL"/>
                        </button>
                        <%--<form id="m_export_form" action="analysis/export/spec/nd" method="post" target="_blank">--%>
                        <%--<input type="hidden" id="m_export_form_param" name="param"/>--%>
                        <%--</form>--%>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div>

        <!-- Modal -->
        <div class="modal fade" id="dlg_ndc_selectItems" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="myModalLabel"><spring:message code="SPC_EXPORT_DIALOG_TITLE"/></h4>
                    </div>
                    <div class="modal-body">
                        <%--<div class="alert alert-warning no-margin fade in" >--%>
                        <%--<button class="close" data-dismiss="alert">--%>
                        <%--×--%>
                        <%--</button>--%>
                        <%--<i class="fa-fw fa fa-info"></i>--%>
                        <%--A combined table effect with all classes mentioned above added to <code>&lt;table&gt;</code>. <code> .table-bordered .table-striped .table-condensed .table-hover .smart-form--%>
                        <%--.has-tickbox </code>--%>
                        <%--</div>--%>
                        <div id="alt_export_ndc" class="alert alert-warning margin-bottom-10" style="display:none; margin-bottom:10px;">abc</div>
                        <div class="">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label><spring:message code="SPC_EXPORT_DIALOG_SELECT_LABEL"/> </label> <i id="i_export_ndc_caret" class="fa fa-caret-down" style="cursor:pointer;"></i>
                                        <div>
                                            <input id="slt_export_ndc_testItems" style="width:100%">
                                            </input>
                                        </div>
                                        <hr/>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <%--<div class="form-group">--%>
                                    <label><spring:message code="SPC_EXPORT_DIALOG_GRID_LABEL"/></label>
                                    <%--</div>--%>
                                    <div class="table-responsive custom-scroll" style="height:290px; overflow-y: scroll;">
                                        <table id="tbl_export_ndc_testItem" class="table table-striped table-condensed table-hover smart-form has-tickbox">
                                            <thead>
                                            <tr>
                                                <th>
                                                    <label class="checkbox">
                                                        <input type="checkbox" id="ckb_export_ndc_tb_topCheck" name="checkbox-inline" class="">
                                                        <i></i>
                                                    </label>
                                                </th>
                                                <th><spring:message code="SPC_EXPORT_DIALOG_ITEM_NAME"/></th>
                                            </tr>
                                            </thead>
                                            <tbody id="m_tb_testItem_body">
                                            </tbody>
                                        </table>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <a href="javascript:void(0);" id="btn_export_ndc_submit" type="button" class="btn btn-success">
                            <%--<spring:message code="SPC_EXPORT_PREVIEW"/>--%>
                            Export
                        </a>
                        <button type="button" class="btn btn-default" data-dismiss="modal">
                            <spring:message code="GLOBAL_BUTTON_CANCEL"/>
                        </button>
                        <%--<form id="m_export_form" action="analysis/export/spec/nd" method="post" target="_blank">--%>
                        <%--<input type="hidden" id="m_export_form_param" name="param"/>--%>
                        <%--</form>--%>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div>

        <div class="modal fade" id="dlg_all_selectCharts" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="myModalLabel1"><spring:message code="SPC_SINGLE_EXPORT_DIALOG_TITLE"/></h4>
                    </div>
                    <div class="modal-body">
                        <div id="alt_export_all" class="alert alert-warning margin-bottom-10 fade in" style="display:none; margin-bottom:10px;"></div>
                        <div class="">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="exportChartsType" value="NDC" class="checkbox style-0" checked="checked">
                                            <span><spring:message code='SPC_TAB_NDC'/></span>
                                        </label>
                                    </div>
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="exportChartsType" value="RUNC" class="checkbox style-0" checked="checked">
                                            <span><spring:message code='SPC_TAB_RCC'/></span>
                                        </label>
                                    </div>
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="exportChartsType" value="XBARC" class="checkbox style-0" checked="checked">
                                            <span><spring:message code='SPC_TAB_MCC'/></span>
                                        </label>
                                    </div>
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="exportChartsType" value="SDC" class="checkbox style-0" checked="checked">
                                            <span><spring:message code='SPC_TAB_STDCC'/></span>
                                        </label>
                                    </div>
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="exportChartsType" value="RC" class="checkbox style-0" checked="checked">
                                            <span><spring:message code='SPC_TAB_RGCC'/></span>
                                        </label>
                                    </div>
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" name="exportChartsType" value="MRC" class="checkbox style-0" checked="checked">
                                            <span><spring:message code='SPC_TAB_MRGCC'/></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <a href="javascript:void(0);" id="btn_export_all_submit" type="button" class="btn btn-success">
                            <%--<spring:message code="SPC_EXPORT_PREVIEW"/>--%>
                            Export
                        </a>
                        <button type="button" class="btn btn-default" data-dismiss="modal">
                            <spring:message code="GLOBAL_BUTTON_CANCEL"/>
                        </button>
                        <%--<form id="m_export_form" action="analysis/export/spec/nd" method="post" target="_blank">--%>
                        <%--<input type="hidden" id="m_export_form_param" name="param"/>--%>
                        <%--</form>--%>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        <!-- /.modal -->
    </div>
    <!-- end row -->

    <div class="row">
        <article class="col-sm-12 sortable-grid ui-sortable">
            <div class="jarviswidget jarviswidget-sortable" id="wgt_testData" data-widget-colorbutton="false" data-widget-editbutton="false" data-widget-deletebutton="false" role="widget" style="">
                <header role="heading">
                    <%--<ul class="nav nav-tabs in" id="myTab2">--%>
                    <%--<li class="active">--%>
                    <%--<a data-toggle="tab" href="#ss1"><span class="hidden-mobile hidden-tablet">All Items</span></a>--%>
                    <%--</li>--%>
                    <%--<li>--%>
                    <%--<a data-toggle="tab" href="#ss2"><span class="hidden-mobile hidden-tablet">Unchecked</span></a>--%>
                    <%--</li>--%>
                    <%--</ul>--%>
                    <h2><strong>Test Data</strong></h2>
                    <div class="jarviswidget-ctrls" role="menu">
                        <a href="javascript:void(0);" class="button-icon jarviswidget-toggle-btn" rel="tooltip" title="" data-placement="bottom" data-original-title="Collapse"><i class="fa fa-minus "></i></a>
                        <a href="javascript:void(0);" class="button-icon jarviswidget-fullscreen-btn" rel="tooltip" title="" data-placement="bottom" data-original-title="Fullscreen"><i class="fa fa-expand "></i></a>
                        <!--<a href="javascript:void(0);" class="button-icon jarviswidget-delete-btn" rel="tooltip" title="" data-placement="bottom" data-original-title="Delete"><i class="fa fa-times"></i></a>-->
                    </div>

                    <span class="jarviswidget-loader"><i class="fa fa-refresh fa-spin"></i></span>

                    <div class="widget-toolbar" role="menu">
                        <button type="button" id="btn_refreshCache" class="btn btn-warning" data-loading-text="&nbsp;&nbsp;Loading...&nbsp;" rel="tooltip" title="" data-placement="bottom"
                                data-original-title="Reset data to default"><i class="fa fa-refresh"></i></button>

                    </div>
                </header>

                <!-- widget div-->
                <div role="content">

                    <!-- widget edit box -->
                    <div class="jarviswidget-editbox">
                    </div>
                    <!-- end widget edit box -->

                    <!-- widget content -->
                    <div class="widget-body no-padding">
                        <!-- content -->
                        <%--<div class="alert alert-warning margin-bottom-0">--%>
                        <%--<strong><i class="fa fa-check"></i> Attention please! </strong> You've changed the test data records, please save your changes.--%>
                        <%--<a href="javascript:void(0);" class="btn btn-xs btn-primary pull-right  margin-right-5">Save changes</a>--%>
                        <%--</div>--%>
                        <div id="div_filterSearchBar" class="widget-body-toolbar padding-10 bg-color-white">
                            <div class="row">
                                <div class="col-xs-5 col-sm-5 col-md-5 col-lg-5">
                                    <!--<div class="input-group">-->
                                    <!--<span class="input-group-addon"><i class="fa fa-search"></i></span>-->
                                    <!--<input class="form-control" id="prepend" placeholder="Filter" type="text">-->
                                    <!--</div>-->
                                    <div class="input-group" style="float:left">
                                        <input class="form-control" type="text" placeholder="Serial Number/Test Value" id="txt_filterValue" name="search_LIKE_name">

                                        <div class="input-group-btn">

                                            <button id="btn_testDataFilter" type="button" class="btn btn-default">
                                                <i class="fa fa-search "></i> Filter
                                            </button>
                                            <%--<button id="btn-simple-reset" type="button" class="btn btn-default">--%>
                                            <%--Reset--%>
                                            <%--</button>--%>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 smart-form">
                                    <div class="inline-group">
                                        <label class="radio">
                                            <input type="radio" name="rda_checkedType" value="ALL" checked="checked">
                                            <i></i>All
                                        </label>
                                        <label class="radio">
                                            <input type="radio" name="rda_checkedType" value="CHECK">
                                            <i></i>Selected
                                        </label>
                                        <label class="radio">
                                            <input type="radio" name="rda_checkedType" value="UNCHECK">
                                            <i></i>Un Selected
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <table id="tbl_testData" class="table table-striped table-bordered table-hover has-tickbox" style="margin-top: 0px !important;">
                            <thead>
                            <tr>
                                <th class="smart-form" style="width:5%;">
                                    <label class="checkbox">
                                        <input type="checkbox" id="ckb_all" checked="checked">
                                        <i></i>
                                    </label>
                                </th>
                                <th style="width:5%;">NO</th>
                                <th>ID</th>
                                <th>Serial Number</th>
                                <th>Upper Limit</th>
                                <th>lower Limit</th>
                                <th>Unit Name</th>
                                <th>Tested Value</th>
                                <th>Result</th>
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>


                    </div>
                    <!-- end widget content -->

                </div>
                <!-- end widget div -->

            </div>
        </article>
    </div>
    <iframe name="uploadf" style="display:none"></iframe>
</section>

<script src="js/core/business/analysis/spc/spcInit.js" type="text/javascript"></script>
